package at.ac.tuwien.lsds.model;

import java.util.Observable;

public abstract class MachineImpl extends Observable implements Machine{

	protected volatile Integer hdd;	// in MB
	protected volatile Integer ram;	// in MB
	protected volatile Integer cpu;	// in MHz
	protected volatile Integer hddInUse = 0;
	protected volatile Integer ramInUse = 0;
	protected volatile Integer cpuInUse = 0;
	protected volatile Boolean shutdown = false;
	
	public MachineImpl() {};
	
	public MachineImpl(Integer hdd, Integer ram, Integer cpu) {
		super();
		this.hdd = hdd;
		this.ram = ram;
		this.cpu = cpu;
	}
	
	public Integer getHdd() {
		return hdd;
	}
	
	public Integer getRam() {
		return ram;
	}
	
	public Integer getCpu() {
		return cpu;
	}
	
	
	public void shutdown(){
		shutdown = true;
	}
	
	@Override
	public Integer getHddInUse() {
		return hddInUse;
	}
	
	@Override
	public Integer getRamInUse() {
		return ramInUse;
	}
	
	@Override
	public Integer getCpuInUse() {
		return cpuInUse;
	}
}
